package com.pwc.conversionTool.entity;

import java.io.Serializable;

import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;
import com.googlecode.objectify.annotation.Serialize;



@Entity
public class DataTemplate implements Serializable {

	/**
	 * 
	 */
	private static long serialVersionUID = -3269900099545460834L;
	
	@Id private Long id;
	
	@Index private String adaptorName;
	
	private String dataType;
	
	private String description;
	
	@Index private Key<Account> account;
	
	@Serialize
	private String[] header;

	public DataTemplate() {
		super();
	}

	public DataTemplate(String adaptorName, String dataType, String description) {
		super();
		this.adaptorName = adaptorName;
		this.dataType = dataType;
		this.description = description;
		
	}

	public long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAdaptorName() {
		return adaptorName;
	}

	public void setAdaptorName(String adaptorName) {
		this.adaptorName = adaptorName;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@JsonIgnore
	public Key<Account> getAccount() {
		return account;
	}

	public void setAccount(Key<Account> account) {
		this.account = account;
	}

	public String[] getHeader() {
		return header;
	}

	public void setHeader(String[] header) {
		this.header = header;
	}
	
	@JsonIgnore
	@Transient
	public com.googlecode.objectify.Key<DataTemplate> getKey() {
	   return com.googlecode.objectify.Key.create(DataTemplate.class, id);
	}

}
